package com.pl.arithmetic;

import com.pl.arithmetic.dto.HeroNode;
import com.pl.arithmetic.link.SingleLinkList;

/**
 * <p>
 *
 * @Description: TODO
 * </p>
 * @ClassName LinkDemo
 * @Author pl
 * @Date 2020/4/17
 * @Version V1.0.0
 */
public class MainTest {

    public static void main(String[] args) {
        HeroNode hero1 = new HeroNode(1, "宋江", "及时雨");
        HeroNode hero2 = new HeroNode(2, "卢俊义", "玉麒麟");
        HeroNode hero3 = new HeroNode(3, "吴用", "智多星");
        HeroNode hero4 = new HeroNode(4, "林冲", "豹子头");

        //创建要给链表
        SingleLinkList singleLinkedList = new SingleLinkList();


        //加入
        singleLinkedList.add(hero1);
        singleLinkedList.add(hero4);
        singleLinkedList.add(hero2);
        singleLinkedList.add(hero3);

        // 测试一下单链表的反转功能
        System.out.println("原来链表的情况~~");
        singleLinkedList.list();
    }

}